<?php 
	$isinfo = $this->countModules('slideshow'); 
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
	<jdoc:include type="head" />
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<script type="text/javascript" src="<?php echo $this->baseurl ?>/templates/hoangkhangproject/js/jquery-ui-1.8.16.custom.min.js"></script>
	<script language="javascript" type="text/javascript" src="<?php echo $this->baseurl ?>/templates/hoangkhangproject/js/jquery.carouFredSel-2.1.3.js"></script>
	<script>
	jQuery(document).ready(function($) {
		var formxx = "#userForm";
	
	
		$(formxx).submit(function() {
			var emailReg = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/;
			url = $(this).attr( 'action' );
			
			
			$(formxx+' #component23').css("display", "none");
			$(formxx+' #component24').css("display", "none");
			$(formxx+' #component25').css("display", "none");
			$(formxx+' #component28').css("display", "none");
			$(formxx+' #component26').css("display", "none");
			//Kiem tra noi dung input
			if( $(formxx+' #name').val()=="" || $(formxx+' #email').val()=="" || !emailReg.test($(formxx+' #email').val()) || $(formxx+' #mobile').val()=="" || $(formxx+' #message').val()=="")
			{
				if($(formxx+' #name').val()=="")		
				{
					//alert($(formxx+' #component29').html()); 
					$(formxx+' #component23').css("display", "block");
				}
				if($(formxx+' #email').val()=="")		
				{
					//alert($(formxx+' #component30').html()); 
					$(formxx+' #component24').css("display", "block");
				}
				if(!emailReg.test($(formxx+' #email1').val()))		
				{
					//alert($(formxx+' #component30').html()); 
					$(formxx+' #component24').css("display", "block");
				}

				if($(formxx+' #mobile').val()=="")		
				{
					//alert($(formxx+' #component31').html()); 
					$(formxx+' #component25').css("display", "block");
				}
				if($(formxx+' #message').val()=="")		
				{
					//alert($(formxx+' #component34').html()); 
					$(formxx+' #component26').css("display", "block");
				}
			}
			else
			{				
				
				// Cho hien dialog thong bao cho
				$('#dialog-message p').html('<div style="padding: 0  20px; text-align: center;"><img style="margin: 0 auto" src="<?php echo $this->baseurl ?>/templates/hoangkhangproject/images/ajax-loading.gif" /><br /> Đang gửi thông tin, vui lòng chờ !</div>');
				$( "#dialog:ui-dialog" ).dialog( "destroy" );	
				$( "#dialog-message" ).dialog({
					modal: true,
					buttons: {
						Ok: function() {
							$( this ).dialog( "close" );
						}
					}
				});		
				
				// Gui noi dung de xu ly
				$.ajax({
					  type: 'POST',
					  url: url,
					  data: $(this).serialize(),
					  success: function(data) {					  
							
								// Cho hien dialog thanh cong
								$('#dialog-message p').html('<div style="padding: 0  20px; text-align: center;"><p><strong>Cám ơn bạn đã gửi email. Chúng tôi sẽ liên hệ trong thời gian sớm nhất</strong></p></div>');
								$( "#dialog:ui-dialog" ).dialog( "destroy" );
							
								$( "#dialog-message" ).dialog({
									modal: true,
									buttons: {
										Ok: function() {
											$( this ).dialog( "close" );
										}
									}
								});
								
								//Reset all input in form
								$(formxx).each(function(){this.reset();});
							
							}
						  
					});				
			}
			return false;
	});

});
	</script>
	<link href="<?php echo $this->baseurl ?>/templates/hoangkhangproject/css/style.css" rel="stylesheet" type="text/css" media="screen" />
	<link href="<?php echo $this->baseurl ?>/templates/hoangkhangproject/css/stylesheet.css" rel="stylesheet" type="text/css" media="screen" />
	<link href="<?php echo $this->baseurl ?>/templates/hoangkhangproject/css/jquery-ui-1.8.16.custom.css" rel="stylesheet" type="text/css"  />
	<!--[if IE 8]>
	<link type="text/css" rel="stylesheet" media="all" href="<?php echo $this->baseurl ?>/templates/hoangkhangproject/css/ie8-fixes.css" />
	<![endif]-->
	<link href="<?php echo $this->baseurl ?>/templates/hoangkhangproject/css/pml.css" rel="stylesheet" type="text/css"  />
</head>
<body>
<div id="_dialog-message" title="Hệ thống">
	<p>
		
	</p>
</div>
<div id="wrapper">
	<div id="header-stretch" class="container">

		<div id="header">
		<ul id="sitemap">
			<jdoc:include type="modules" name="sitemap" />
			<li><a href=""><img src="<?php echo $this->baseurl ?>/templates/hoangkhangproject/images/flag.png" alt="" /></a></li>
		</ul>		
			<h1><a href="">Hoang Khang</a></h1>

			<div id="mainnav">
			
				<jdoc:include type="modules" name="mainmenu" />		
				
				<jdoc:include type="modules" name="search" />			

			</div>
		</div><!--end header-->
	
	</div><!--end header-stretch-->
	<div class="clear"></div>
		<?php if($isinfo) { ?>
	<div id="slideshow" class="container">
		<jdoc:include type="modules" name="slideshow" />
	</div>
	
	<div class="clear"></div>
		<jdoc:include type="modules" name="latestnews" />
	<div class="line container" ></div>
	<div class="clear"></div>
	
	<div id="maincontent" class="container">
	
		<jdoc:include type="modules" name="service" />

	</div><!--end maincontent-->
	
	<div class="clear"></div>
	<?php } else { ?>
	<div id="maincontent" class="container">

		<div id="content">
			<jdoc:include type="modules" name="photo" />

			<jdoc:include type="component" />
		</div><!--end content-->
		<div id="sidebar">
					<jdoc:include type="modules" name="cate" />
	
					
					<div class="services1">
						<div class="services">
							<a href="giai-phap/giai-phap-cong-nghe-thong-tin">Giải pháp hạ tầng mạng</a>
						</div>
					</div>
					
					<div class="services2">
						<div class="services">
							<a href="giai-phap/giai-phap-truyen-thong">Giải pháp truyền thông</a>
						</div>
					</div>
					
					<div class="services3">
						<div class="services">
							<a href="dich-vu">Dịch vụ và hỗ trợ</a>
						</div>
					</div>
					
		</div><!--sidebar-->
	</div><!--end maincontent-->
	<div class="clear"></div>
	<?php } ?>
	<div id="footer">
	<div class="container" style="height:215px">
		<div class="blocks partner">
			<h2>Các đối tác</h2>
				<jdoc:include type="modules" name="blocks" />
				<ul class="logo-doitac">
					<li><img src="<?php echo $this->baseurl ?>/templates/hoangkhangproject/images/bmn.jpg" alt="" /></li>
					<li><img src="<?php echo $this->baseurl ?>/templates/hoangkhangproject/images/bmn.jpg" alt="" /></li>
					<li><img src="<?php echo $this->baseurl ?>/templates/hoangkhangproject/images/bmn.jpg" alt="" /></li>
					<li><img src="<?php echo $this->baseurl ?>/templates/hoangkhangproject/images/bmn.jpg" alt="" /></li>
				</ul>
		</div><!--end blocks-->
		
		<div class="blocks recent_news">
		
			<jdoc:include type="modules" name="latestnews1" />

		</div><!--end blocks-->
		
		<div class="blocks info">
			<h2>Thông tin liên hệ</h2>
			<p>Công ty TNHH giải pháp truyền thông và công nghệ thông tin Hoàng Khang</p>
			<ul >
				<li class="add">144 Nguyễn Văn Lượng, P17, Q.Gò Vấp, TPHCM</li>
				<li class="mobile">(84-8) 39847691</li>
				<li class="mail"><a href="">network@hoangkhang.com.vn</a></li>
			</ul>
		</div><!--end blocks-->
		

		</div>
		<div id="foot-nav">
			<div class="container">
			
				<jdoc:include type="modules" name="bottommenu" />

				<p class="copyright">© Copyright 2008 - 2012. hoangkhang.com.vn. All Rights Reserved</p>
			</div>
		</div><!--end foot-nav-->		
	</div><!--end footer-->
</div><!--end wrapper-->
</body>
</html>